require 'mongo'

module SimplyMongo

  class Driver
    attr :db, :conn

    def initialize(database=nil, host='localhost', port=27017, options={})
      @conn = Mongo::Connection.new(host, port, options)
      if not database.nil? then
        @db = @conn[database]
      end
    end

    def to_s
      " " + @conn.to_s + " " +  @db.to_s
    end
  end

end
